package com.tx.websocket.demo.model;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

public class User implements Serializable {

    /**
     *
     * 数据库类型：bigint(20)
     */
    private Long id;

    /**
     * 用户登录名
     * 数据库类型：varchar(255)
     */
    @NotBlank(message = "用户名不能为空")
    private String username;

    /**
     * 用户真实姓名
     * 数据库类型：varchar(255)
     */
    @NotBlank(message = "真实姓名不能为空")
    private String realName;

    /**
     * 密码，hmac加密
     * 数据库类型：varchar(32)
     */
    private String password;

    /**
     * 用户级别，0：超管，1：管理员，2：普通用户
     * 数据库类型：tinyint(1)
     */
    private Integer level;

    /**
     * 是否启用，1：启用，0：关闭
     * 数据库类型：bit(1)
     */
    private Boolean enable;

    /**
     * 邮件地址
     * 数据库类型：varchar(255)
     */
    private String email;

    /**
     * 联系方式，电话
     * 数据库类型：varchar(16)
     */
    private String mobile;

    /**
     * 创建时间
     * 数据库类型：datetime
     */
    private Date createTime;

    /**
     * 最近更新时间
     * 数据库类型：datetime
     */
    private Date updateTime;

    /**
     * 描述
     * 数据库类型：varchar(1000)
     */
    private String remark;

    private List<Role> roles;

    private List<BaseResource> resources;

    private List<String> permMarks;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUsername() {
        return username;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getRealName() {
        return realName;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPassword() {
        return password;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Integer getLevel() {
        return level;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getEmail() {
        return email;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getMobile() {
        return mobile;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getRemark() {
        return remark;
    }

    public List<Role> getRoles() {
        return roles;
    }

    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }

    public List<BaseResource> getResources() {
        return resources;
    }

    public void setResources(List<BaseResource> resources) {
        this.resources = resources;
    }

    public List<String> getPermMarks() {
        return permMarks;
    }

    public void setPermMarks(List<String> permMarks) {
        this.permMarks = permMarks;
    }
}
